/* =========================================================================
   Design Tokens & Resets (Plan C - Immersive Storytelling)
   ========================================================================= */

:root {
    --c-bg: #050505;
    --c-text: #f4f4f5;
    --c-text-muted: #a1a1aa;
    --c-accent: #10b981;
    /* Precise medical green */
    --c-accent-glow: rgba(16, 185, 129, 0.4);
    --c-border: #27272a;

    --font-heading: 'Noto Serif TC', serif;
    --font-body: 'Noto Sans TC', sans-serif;

    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--c-bg);
}

body {
    font-family: var(--font-body);
    background-color: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* =========================================================================
   Noise Texture Overlay
   ========================================================================= */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* =========================================================================
   Utilities
   ========================================================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5vw;
}

.section {
    padding: 10rem 0;
    position: relative;
}

/* =========================================================================
   Navigation
   ========================================================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: background 0.4s var(--ease-out-expo);
}

.nav.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border);
}

.nav__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--c-text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.orb-logo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, var(--c-accent));
    box-shadow: 0 0 15px var(--c-accent-glow);
}

.nav__links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav__link {
    color: var(--c-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.nav__link:hover {
    color: var(--c-text);
}

/* =========================================================================
   Hero Section
   ========================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero__bg-container {
    position: absolute;
    inset: 0;
    z-index: -1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.abstract-sphere {
    width: 40vw;
    height: 40vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    animation: breathe 8s ease-in-out infinite alternate;
}

@keyframes breathe {
    0% {
        transform: scale(0.9);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.glow-point {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 20px 5px var(--c-accent);
    filter: blur(2px);
}

.p1 {
    top: 30%;
    left: 40%;
    animation: float 10s ease-in-out infinite;
}

.p2 {
    top: 60%;
    right: 35%;
    animation: float 12s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -40px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.hero__content {
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero__title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    position: relative;
}

.hero__super-title {
    display: block;
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 900;
    font-family: var(--font-heading);
    color: rgba(16, 185, 129, 0.15);
    /* 增加淺色底以提高明度 */
    -webkit-text-stroke: 2px rgba(16, 185, 129, 0.9);
    /* 強化邊框亮度與厚度 */
    letter-spacing: 0.1em;
    line-height: 0.8;
    margin-bottom: 2rem;
    opacity: 1;
    text-shadow: 0 0 60px rgba(16, 185, 129, 0.5);
    /* 加強霓虹光暈 */
}

.glow-text {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4);
    position: relative;
    display: inline-block;
}

.glow-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--c-text);
    opacity: 0;
    text-shadow: 0 0 30px var(--c-accent-glow);
    transition: opacity 1s var(--ease-out-expo);
}

/* Used for JS sequence */
.word-reveal {
    display: inline-block;
}

.hero__subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--c-text-muted);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--c-text-muted);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--c-accent) 0%, transparent 100%);
    animation: flowDown 2s infinite;
}

@keyframes flowDown {
    0% {
        transform: scaleY(0);
        transform-origin: top;
        opacity: 1;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
        opacity: 1;
    }

    50.1% {
        transform: scaleY(1);
        transform-origin: bottom;
        opacity: 1;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
        opacity: 0;
    }
}

/* =========================================================================
   Intro Section
   ========================================================================= */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-statement {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 300;
    line-height: 1.4;
    color: var(--c-text-muted);
}

.text-highlight {
    color: var(--c-text);
    font-weight: 500;
    position: relative;
}

.text-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--c-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease-out-expo);
}

.intro-statement.is-active .text-highlight::after {
    transform: scaleX(1);
}

.image-reveal-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/5;
}

.reveal-curtain {
    position: absolute;
    inset: 0;
    background: var(--c-bg);
    z-index: 2;
}

.parallax-img {
    width: 100%;
    height: 120%;
    /* Extra height for parallax */
    object-fit: cover;
    filter: brightness(0.8) contrast(1.1);
}

/* =========================================================================
   Services Sticky Section
   ========================================================================= */
.section-services {
    padding: 0;
    /* Handled by internal geometry */
}

.services-container {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.services-visuals {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sv-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s var(--ease-in-out), visibility 0.6s;
}

.sv-item.active {
    opacity: 1;
    visibility: visible;
}

.sv-item img {
    max-width: 80%;
    max-height: 70vh;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    filter: grayscale(0.5) contrast(1.2);
}

.cellular-abstract {
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    position: relative;
    animation: rotate 20s linear infinite;
}

.cellular-abstract::before,
.cellular-abstract::after {
    content: '';
    position: absolute;
    border: 1px solid var(--c-accent);
    border-radius: 50%;
}

.cellular-abstract::before {
    inset: -20px;
    border-style: dashed;
    animation: rotate 15s linear infinite reverse;
}

.cellular-abstract::after {
    inset: 40px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent);
}

.alpha-particle-abstract {
    position: relative;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 30px 10px var(--c-accent);
}

.alpha-particle-abstract::before,
.alpha-particle-abstract::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.alpha-particle-abstract::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.services-content {
    width: 40%;
    padding: 50vh 0;
    /* Padding creates the scroll duration */
}

.service-block {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--c-accent);
    margin-bottom: 1rem;
    font-family: monospace;
}

.service-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.service-desc {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    font-weight: 300;
}

/* Services Extended Grid */
.section-services-extended {
    padding-top: 0;
    /* Flows naturally from the sticky section */
}

.service-extended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.se-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.4s var(--ease-out-expo), background 0.4s;
}

.se-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.se-item h3 {
    font-size: 1.25rem;
    color: var(--c-white);
    margin-bottom: 1rem;
    font-weight: 500;
}

.se-item p {
    color: var(--c-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =========================================================================
   Equipment Cards Parallax
   ========================================================================= */
.eq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 5rem;
}

.eq-card {
    display: flex;
    flex-direction: column;
}

.eq-card--offset {
    margin-top: 8rem;
}

.eq-img-wrapper {
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 2rem;
    aspect-ratio: 4/3;
}

.eq-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: filter 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.eq-card:hover .eq-img-wrapper img {
    filter: grayscale(0);
    transform: scale(1.05);
}

.eq-name {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.eq-desc {
    color: var(--c-accent);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.eq-details {
    color: var(--c-text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    font-weight: 300;
}

/* =========================================================================
   FAQ Minimalist Static
   ========================================================================= */
.faq-container {
    max-width: 800px;
}

.faq-list {
    margin-top: 4rem;
    border-top: 1px solid var(--c-border);
}

.faq-row {
    border-bottom: 1px solid var(--c-border);
    padding: 2rem 0;
}

.faq-trigger-static {
    width: 100%;
    color: var(--c-accent);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.faq-panel-static p {
    color: var(--c-text-muted);
    font-weight: 300;
}

/* =========================================================================
   Custom SVGs & Animations
   ========================================================================= */
.sci-svg {
    width: 100%;
    height: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
        transform-origin: center;
    }

    to {
        transform: rotate(360deg);
        transform-origin: center;
    }
}

@keyframes spinReverse {
    from {
        transform: rotate(360deg);
        transform-origin: center;
    }

    to {
        transform: rotate(0deg);
        transform-origin: center;
    }
}

@keyframes pulseFast {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
        filter: blur(2px);
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.spin-slow {
    animation: spinSlow 30s linear infinite;
    transform-origin: center;
}

.spin-reverse {
    animation: spinReverse 40s linear infinite;
    transform-origin: center;
}

.pulse-fast {
    animation: pulseFast 2s ease-in-out infinite;
    transform-origin: center;
}

/* Services Buttons */
.btn-more {
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: transparent;
    color: var(--c-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-more:hover {
    background: var(--c-white);
    color: var(--c-bg);
}

.read-more {
    display: block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--c-accent);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.se-item:hover .read-more {
    opacity: 1;
}

.se-item {
    cursor: pointer;
}

/* =========================================================================
   Cinematic Dark Modal
   ========================================================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal__container {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    background: rgba(15, 15, 16, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 3rem;
    overflow-y: auto;
    transform: translateY(30px) scale(0.98);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.modal.is-open .modal__container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal__close:hover {
    color: var(--c-white);
}

.modal__content {
    color: var(--c-text-muted);
}

.modal__content h2 {
    color: var(--c-white);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.modal__tag {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--c-accent);
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.modal__content h3 {
    color: var(--c-white);
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.modal__content p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal__content ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.modal__content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.modal__content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    background: var(--c-accent);
    border-radius: 50%;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--c-border);
    margin-top: 10rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

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

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 768px) {
    .section {
        padding: 5rem 0;
    }

    .nav__brand {
        font-size: 1rem;
    }

    .nav__links {
        display: none;
    }

    .hero__super-title {
        font-size: clamp(4rem, 16vw, 6rem);
        margin-bottom: 1rem;
    }

    .hero__title {
        font-size: clamp(3rem, 12vw, 4.5rem);
    }

    .hero__subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .intro-grid,
    .eq-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .intro-statement {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

    .eq-card--offset {
        margin-top: 0;
    }

    .services-container {
        flex-direction: column;
    }

    .services-visuals {
        width: 100%;
        height: 50vh;
        top: 80px;
        z-index: -1;
    }

    .services-content {
        width: 100%;
        padding: 0;
    }

    .service-block {
        padding: 4rem 0;
        height: auto;
        min-height: 50vh;
        justify-content: flex-end;
    }

    .service-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .se-item {
        padding: 1.5rem;
    }

    .modal__container {
        padding: 2rem 1.5rem;
    }

    .modal__content h2 {
        font-size: 1.5rem;
    }

    .footer {
        padding: 3rem 0;
        margin-top: 5rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}