:root {
    --primary-color: #0071e3;
    --secondary-color: #5e5ce6;
    --bg-dark: #f5f5f7;
    --bg-card: #ffffff;
    --bg-light: #ffffff;
    --text-light: #1d1d1f;
    --text-dark: #1d1d1f;
    --accent: #0071e3;
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transform: translateX(-105%);
    background: linear-gradient(105deg, rgba(255, 255, 255, 0), rgba(0, 113, 227, 0.12), rgba(94, 92, 230, 0.1), rgba(255, 255, 255, 0));
}

body.is-switching::before {
    animation: pageSweep 0.7s cubic-bezier(.4, 0, .2, 1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

/* Header */
.hero-section {
    background: linear-gradient(120deg, rgba(250, 250, 252, 0.16), rgba(235, 238, 244, 0.24)), url('assets/teaser.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    min-height: 100svh;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero-section .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-section::before {
    background: radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.58), transparent 52%),
                radial-gradient(circle at 74% 56%, rgba(0, 113, 227, 0.12), transparent 48%);
    mix-blend-mode: normal;
}

.hero-section::after {
    background: linear-gradient(125deg, rgba(252, 253, 255, 0.42), rgba(245, 247, 252, 0.14) 35%, rgba(214, 220, 230, 0.52));
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    width: 100%;
    min-height: 100%;
    padding: 1.5rem 1rem;
    transition: transform 0.35s ease-out;
}

.hero-panel {
    max-width: 980px;
    width: min(92vw, 980px);
    padding: 1.4rem 0 0;
    position: relative;
    overflow: visible;
    margin: 0 auto;
    text-align: center;
    -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 34%, rgba(0, 0, 0, 0.9) 58%, rgba(0, 0, 0, 0.72) 80%, rgba(0, 0, 0, 0.52) 100%);
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 34%, rgba(0, 0, 0, 0.9) 58%, rgba(0, 0, 0, 0.72) 80%, rgba(0, 0, 0, 0.52) 100%);
}

.hero-title {
    font-size: clamp(3.2rem, 7vw, 6rem);
    font-weight: 800;
    margin-bottom: 1.1rem;
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: #1d1d1f;
    text-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
    position: relative;
    z-index: 1;
}

.hero-title span {
    font-size: clamp(1.2rem, 2.3vw, 1.9rem);
    font-weight: 500;
    display: block;
    margin-top: 0.65rem;
    color: #3a3a3c;
    text-shadow: none;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    max-width: 760px;
    margin: 0 auto 2.4rem;
    font-weight: 400;
    color: #515154;
    text-shadow: none;
    position: relative;
    z-index: 1;
}

.hero-authors {
    font-size: clamp(0.95rem, 1.6vw, 1.2rem);
    max-width: 900px;
    margin: -0.5rem auto 1.5rem;
    font-weight: 500;
    color: #424245;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.hero-authors a {
    color: #0071e3;
    transition: opacity 0.2s;
}

.hero-authors a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    z-index: 10;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.nav-links a {
    margin-left: 2rem;
    font-weight: 500;
    color: var(--text-light);
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(8px);
}

.btn-outline {
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--bg-dark);
}

.btn-primary {
    background: linear-gradient(140deg, #0071e3, #0a84ff);
    color: #fff;
    margin-right: 0;
    box-shadow: 0 10px 24px rgba(0, 113, 227, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(140deg, #0062c4, #0071e3);
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 113, 227, 0.34);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(209, 213, 219, 0.9);
    color: #1d1d1f;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.96);
    transform: translateY(-3px);
}

.btn-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

/* Sections */
.section {
    padding: 6rem 0;
    position: relative;
    transition: transform 0.6s cubic-bezier(.22, 1, .36, 1), opacity 0.6s cubic-bezier(.22, 1, .36, 1), filter 0.6s cubic-bezier(.22, 1, .36, 1);
}

.section::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.75s cubic-bezier(.22, 1, .36, 1);
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.42), transparent 58%);
}

.section.section-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1);
}

.section.section-active::after {
    opacity: 1;
}

.section.section-inactive {
    opacity: 0.88;
    transform: translateY(12px) scale(0.995);
    filter: saturate(0.94);
}

.dark-bg {
    background-color: #f5f5f7;
}

.light-bg {
    background-color: #fbfbfd;
    color: var(--text-dark);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.divider {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, #0071e3, #5e5ce6);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.text-block h3 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.text-block p {
    color: #6e6e73;
    font-size: 1.1rem;
}

#framework.light-bg {
    background: linear-gradient(180deg, #ffffff, #f5f5f7);
    color: #1d1d1f;
}

#framework .section-header h2 {
    color: #1d1d1f;
    text-shadow: none;
}

#framework .section-header p {
    color: #6e6e73;
}

#framework .divider {
    background: linear-gradient(90deg, #0071e3, #5e5ce6);
    box-shadow: none;
}

.framework-flow {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr) auto minmax(200px, 1fr) auto minmax(200px, 1fr);
    align-items: center;
    gap: 0.72rem;
}

.flow-stage {
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.flow-stage.flow-active {
    transform: translateY(-3px);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.12);
}

.framework-stage {
    border-radius: 22px;
    padding: 1rem;
    border: 1px solid rgba(218, 220, 224, 0.9);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68));
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.68rem;
    backdrop-filter: blur(14px);
}

.stage-entities {
    padding: 1.2rem;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
}

.stage-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    justify-content: center;
}

.stage-index {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #0071e3, #5e5ce6);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(0, 113, 227, 0.32);
}

.stage-head h3 {
    margin: 0;
    color: #1d1d1f;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.entity-grid.entity-simple {
    display: grid;
    gap: 0.45rem;
}

.entity-grid.entity-simple span {
    border-radius: 10px;
    background: linear-gradient(160deg, #ffffff, #f4f5f7);
    text-align: center;
    padding: 0.42rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #424245;
    border: 1px solid rgba(219, 224, 230, 0.95);
}

.framework-connector {
    width: 52px;
    align-self: center;
    margin-top: 0;
    position: relative;
}

@keyframes flowPulse {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.framework-connector::before {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(189, 194, 201, 0.5) 0%, #0071e3 50%, rgba(189, 194, 201, 0.5) 100%);
    background-size: 200% 100%;
    animation: flowPulse 3s linear infinite;
    box-shadow: none;
    border-radius: 99px;
}

.framework-connector::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 10px solid #8e8e93;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    filter: none;
}

.node-actions {
    display: grid;
    gap: 0.45rem;
}

.node-actions span {
    border-radius: 10px;
    background: linear-gradient(160deg, #ffffff, #f4f5f7);
    text-align: center;
    padding: 0.42rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #424245;
    border: 1px solid rgba(219, 224, 230, 0.95);
}

.core-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}

.core-stack {
    display: grid;
    gap: 0.55rem;
}

.core-input-rail {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    z-index: 2;
}

.talk-input {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.36rem 0.8rem;
    background: linear-gradient(140deg, rgba(0, 113, 227, 0.11), rgba(94, 92, 230, 0.13));
    font-weight: 700;
    color: #1d1d1f;
    font-size: 0.8rem;
    border: 1px solid rgba(188, 198, 214, 0.95);
}

.talk-input-arrow {
    width: 2px;
    height: 24px;
    background: linear-gradient(to bottom, rgba(142, 142, 147, 0.4), #0071e3);
    position: relative;
    border-radius: 2px;
}

.talk-input-arrow::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    border-top: 6px solid #0071e3;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.physclaw-core {
    min-height: 96px;
    border-radius: 16px;
    background: linear-gradient(140deg, #1f2024, #353741 52%, #1f2024);
    display: grid;
    place-items: center;
    padding: 0.85rem 0.9rem;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26), 0 18px 30px rgba(0, 0, 0, 0.24);
    position: relative;
    overflow: hidden;
}

.physclaw-core::before {
    content: '';
    position: absolute;
    inset: -48% -22% auto auto;
    width: 220px;
    height: 130px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 68%);
}

.core-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #f5f5f7;
    letter-spacing: 0.01em;
}

.core-subtitle {
    margin-top: 0.28rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.85);
    letter-spacing: 0.02em;
}

.loop-block {
    display: grid;
    justify-items: center;
    gap: 0.54rem;
    align-content: center;
}

.loop-title {
    text-align: center;
    font-weight: 700;
    font-size: 0.88rem;
    color: #515154;
}

.loop-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 6px solid #8e8e93;
    border-right-color: transparent;
    border-left-color: transparent;
    transform: rotate(18deg);
    position: relative;
    animation: loopSpin 3.2s linear infinite;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.loop-icon::before,
.loop-icon::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

.loop-icon::before {
    top: 6px;
    right: -8px;
    border-left: 11px solid #8e8e93;
}

.loop-icon::after {
    bottom: 6px;
    left: -8px;
    border-right: 11px solid #8e8e93;
}

/* Framework Cards */
.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.35s, box-shadow 0.35s, border-top-color 0.35s;
    border-top: 4px solid transparent;
    will-change: transform;
}

.card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 18px 32px rgba(2, 6, 23, 0.14);
    border-top-color: var(--accent);
}

.icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.card ul {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}

.card li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Features */
.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1080px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(224, 227, 231, 0.9);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 113, 227, 0.32);
    box-shadow: 0 22px 36px rgba(0, 0, 0, 0.12);
}

.feature-item::after {
    content: '';
    position: absolute;
    inset: auto -30% -55% auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.1), transparent 65%);
    pointer-events: none;
}

.feature-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(0, 113, 227, 0.14);
    margin-right: 2rem;
    line-height: 1;
}

.feature-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #1d1d1f;
}

.feature-text p {
    margin: 0;
    color: #6e6e73;
    line-height: 1.7;
}

.feature-intro {
    max-width: 1080px;
    margin: 0 auto 1.35rem;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    border: 1px solid rgba(222, 226, 232, 0.9);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(12px);
}

.feature-intro p {
    margin: 0;
    color: #515154;
    line-height: 1.6;
}

.feature-cta {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 113, 227, 0.22);
    border-radius: 999px;
    padding: 0.54rem 1rem;
    color: #0071e3;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.feature-cta:hover {
    transform: translateY(-2px);
    background-color: rgba(0, 113, 227, 0.1);
    border-color: rgba(0, 113, 227, 0.34);
}

.feature-item--contrib {
    border-style: solid;
    border-color: rgba(204, 210, 220, 0.95);
    background: linear-gradient(160deg, rgba(252, 252, 253, 0.88), rgba(244, 245, 248, 0.78));
}

.feature-tag {
    display: inline-flex;
    margin-top: 0.8rem;
    padding: 0.3rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 113, 227, 0.2);
    color: #0071e3;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Footer */
.footer {
    background-color: #fbfbfd;
    padding: 3rem 0;
    border-top: 1px solid rgba(218, 223, 230, 0.8);
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer p {
    color: #86868b;
    font-size: 0.9rem;
}

.reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.993);
    filter: blur(6px);
    transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

@keyframes heroZoom {
    0% {
        background-size: 104%;
    }
    100% {
        background-size: 108%;
    }
}

@keyframes loopSpin {
    from {
        transform: rotate(18deg);
    }
    to {
        transform: rotate(378deg);
    }
}

@keyframes pageSweep {
    0% {
        opacity: 0;
        transform: translateX(-105%);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(105%);
    }
}

@media (max-width: 768px) {
    .hero-panel {
        width: min(94vw, 640px);
        padding: 0.8rem 0 0;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.08;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .feature-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .framework-flow {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .framework-connector {
        width: 2px;
        height: 24px;
        justify-self: center;
        margin-top: 0;
        align-self: center;
    }

    .framework-connector::before {
        width: 2px;
        height: 100%;
        background: linear-gradient(180deg, rgba(184, 190, 198, 0.88), rgba(131, 137, 145, 0.92));
    }

    .framework-connector::after {
        right: 50%;
        top: auto;
        bottom: -7px;
        transform: translateX(50%);
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid #8e8e93;
        border-bottom: 0;
    }

    .entity-grid.entity-simple {
        grid-template-columns: 1fr;
    }

    .physclaw-core {
        min-height: 128px;
    }
    
    .hero-section {
        background-attachment: scroll;
        animation: none;
        min-height: 100svh;
    }
    
    .hero-buttons {
        gap: 0.75rem;
        justify-content: center;
    }

    .section.section-inactive {
        opacity: 0.86;
        transform: translateY(10px) scale(0.996);
    }
}
